import request from '@/utils/request'

export default{
    //条件查询分页
    pageList(pageNum,pageSize,searchObj){
        return request({
            url: `/match/selectMatchPage/${pageNum}/${pageSize}`,
            method: 'post',
            //使用json格式传递 写法data：searchObj
            //使用j普通格式传递 写法params：searchObj
            data:searchObj
          })
    },

    removeMatchId(id){
        return request({
            url: `/match/deleteMatchById/${id}`,
            method: 'delete',
          })

    },

    saveMatch(match){
        return request({
            url: `/match/insertMatch`,
            method: 'post',
            data:match
          })
    },

    getMatchById(id){
        return request({
            url: `/match/getMatchById/${id}`,
            method: 'get',
          })
    },

    updateMatch(match){
        return request({
            url: `/match/updateMatch`,
            method: 'post',
            data:match
          })
    },

    batchRemove(idList) {
        return request({
          url: `/match/removeBatch`,
          method: `delete`,
          data: idList
        })
    },
    getMatchByTime(time) {
      return request({
        url: `/match/getMatchByTime`,
        method: `post`,
        data: {
          time: time
        }
      })
  },
}